/******************************************************************************
  * @project: LT9211
  * @file: lt9211.h
  * @author: zll
  * @company: LONTIUM COPYRIGHT and CONFIDENTIAL
  * @date: 2019.04.10
******************************************************************************/

#ifndef _LT9211_H
#define _LT9211_H

#include <stdint.h>

/******************* LVDS Input Config ********************/
#define INPUT_PORTA
//#define INPUT_PORTB

#define INPUT_PORT_NUM 1

typedef enum LVDS_FORMAT_ENUM{
    VESA_FORMAT = 0,
    JEIDA_FORMAT
} LFE;
#define LVDS_FORMAT JEIDA_FORMAT
//#define LVDS_FORMAT VESA_FORMAT

typedef enum LVDS_MODE_ENUM{
    DE_MODE = 0,
    SYNC_MODE
} LME;
#define LVDS_MODE SYNC_MODE


typedef struct video_timing{
uint16_t hfp;
uint16_t hs;
uint16_t hbp;
uint16_t hact;
uint16_t htotal;
uint16_t vfp;
uint16_t vs;
uint16_t vbp;
uint16_t vact;
uint16_t vtotal;
uint32_t pclk_khz;
} VT;

typedef struct sync_pol{
/* 0:LOW-ACT 1:HIGH-ACT */
uint8_t hsync;
/* 0:LOW-ACT 1:HIGH-ACT */
uint8_t vsync;
/* 0:HIGH-ACT 1:LOW-ACT */
uint8_t de;
/* 0:RISING-EDGE-LATCH 1:FALLING-EDGE-LATCH */
uint8_t clk;
} SP;

void LT9211_LVDS2MIPIDSI_Config(void);

#endif